using System;
using System.Collections.Generic;

namespace RBAC.Read.Api.Application.Dto.Quality
{
    public class ArrivalInspectionListDto
    {
        /// <summary>
        /// 主键
        /// </summary>
        public long Id { get; set; }
        /// <summary>
        /// 文档编号
        /// </summary>
        public string DocCode { get; set; } = string.Empty;
        /// <summary>
        /// 标题
        /// </summary>
        public string Subject { get; set; } = string.Empty;
        /// <summary>
        /// 检验日期
        /// </summary>
        public DateTime InspectionDate { get; set; }
        /// <summary>
        /// 检验人
        /// </summary>
        public string Inspector { get; set; } = string.Empty;
        /// <summary>
        /// 部门
        /// </summary>
        public string Department { get; set; } = string.Empty;
        /// <summary>
        /// 采购订单号
        /// </summary>
        public string PurchaseOrderNo { get; set; } = string.Empty;
        /// <summary>
        /// 供应商名称
        /// </summary>
        public string SupplierName { get; set; } = string.Empty;
        /// <summary>
        /// 业务状态
        /// </summary>
        public int BizStatus { get; set; }
        /// <summary>
        /// 文档状态
        /// </summary>
        public string DocStatus { get; set; } = string.Empty;
        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateUser { get; set; } = string.Empty;
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 供应商ID
        /// </summary>
        public string SupplierId { get; set; }
        
        /// <summary>
        /// 采购日期
        /// </summary>
        public DateTime? PurchaseDate { get; set; }

        /// <summary>
        /// 采购联系人
        /// </summary>
        public string PurchaseContact { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        public string ContactPhone { get; set; }

        /// <summary>
        /// 采购人员
        /// </summary>
        public string Buyer { get; set; }

        /// <summary>
        /// 采购部门
        /// </summary>
        public string PurchaseDept { get; set; }

        /// <summary>
        /// 关联项目（可选）
        /// </summary>
        public string ProjectName { get; set; }

        /// <summary>
        /// 明细条数
        /// </summary>
        public int ItemCount { get; set; }
        /// <summary>
        /// 检验数量合计
        /// </summary>
        public decimal InspectQtySum { get; set; }
        /// <summary>
        /// 合格数量合计
        /// </summary>
        public decimal QualifiedQtySum { get; set; }
        /// <summary>
        /// 不合格数量合计
        /// </summary>
        public decimal UnqualifiedQtySum { get; set; }
        /// <summary>
        /// 附件数量
        /// </summary>
        public int AttachmentCount { get; set; }

        /// <summary>
        /// 明细集合
        /// </summary>
        public List<ArrivalInspectionItemDto> Items { get; set; } = new();
        /// <summary>
        /// 附件集合
        /// </summary>
        public List<ArrivalInspectionAttachmentDto> Attachments { get; set; } = new();
    }
}
